import { createRouter, createWebHistory } from 'vue-router'
import Layout from "@/layout/Layout";
import User from "@/views/User";


const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect:"/Login",
    children:[
      {
        path: 'person',
        name: 'Person',
        component: () => import("@/views/Person"),
      },
      {
        path: 'user',
        name: 'User',
        component: () => import("@/views/User"),
      },
      {
        path: 'student',
        name: 'Student',
        component: () => import("@/views/Student"),
      },
      {
        path: 'stuFile',
        name: 'StuFile',
        component: () => import("@/views/StuFile"),
      },
      {
        path: 'classes',
        name: 'Classes',
        component: () => import("@/views/Classes"),
      },
      {
        path: 'course',
        name: 'Course',
        component: () => import("@/views/Course"),
      },
      {
        path: 'leave',
        name: 'Leave',
        component: () => import("@/views/Leave"),
      },
      {
        path: 'notice',
        name: 'Notice',
        component: () => import("@/views/Notice"),
      },
      {
        path: 'homework',
        name: 'Homework',
        component: () => import("@/views/Homework"),
      },
      {
        path: 'activity',
        name: 'Activity',
        component: () => import("@/views/Activity"),
      },
      {
        path: 'rotation',
        name: 'Rotation',
        component: () => import("@/views/Rotation"),
      },
      {
        path: 'danceKinds',
        name: 'DanceKinds',
        component: () => import("@/views/DanceKinds"),
      },
      {
        path: 'schedule',
        name: 'Schedule',
        component: () => import("@/views/Schedule"),
      },
      {
        path: 'experience',
        name: 'Experience',
        component: () => import("@/views/Experience"),
      },
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import("@/views/Login")
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import("@/views/Register")
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
